<template>
  <div v-if="visible" class="pay-status-dialog-mask">
    <div class="pay-status-dialog-box">
      <div class="pay-status-dialog-title">请确认微信支付是否已完成</div>
      <div class="pay-status-dialog-divider"></div>
      <div class="pay-status-dialog-btn pay-status-dialog-btn-main" @click="$emit('confirm')">已完成支付</div>
      <div class="pay-status-dialog-divider"></div>
      <div class="pay-status-dialog-btn pay-status-dialog-btn-sub" @click="$emit('retry')">支付遇到问题，重新支付</div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'PayStatusDialog',
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  }
};
</script>

<style scoped>
.pay-status-dialog-mask {
  position: fixed;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pay-status-dialog-box {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  width: 300px;
  padding: 0;
  overflow: hidden;
  text-align: center;
}
.pay-status-dialog-title {
  font-size: 16px;
  color: #222;
  padding: 24px 0 18px 0;
}
.pay-status-dialog-divider {
  height: 1px;
  background: #f0f0f0;
  margin: 0;
}
.pay-status-dialog-btn {
  font-size: 16px;
  padding: 16px 0;
  cursor: pointer;
  user-select: none;
}
.pay-status-dialog-btn-main {
  color: #dd302c;
  font-weight: 500;
}
.pay-status-dialog-btn-sub {
  color: #888;
}
</style> 